﻿
using SailHero.Soft.FrameWork.DomainRepositories;
using SailHero.Soft.FrameWork.Models;

namespace UI.Web.SL.Demo.RIAServices.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // TODO: Create methods containing your application logic.
    [EnableClientAccess()]
    public class LogDService : DomainService
    {
        private LogRepository _bllLog = new LogRepository();

        [Insert]
        public void Add(LOG log)
        {
            log.ID = Guid.NewGuid().ToString("N");
            _bllLog.Add(log);
            _bllLog.UnitOfWork.SaveChanges();
        }

        public List<LOG> GetLogs()
        {
            return _bllLog.GetLogs();
        }
    }
}


